// fxobj.txt 

// Like a basic talking object, but it also creates sparkels on itself
// Cell 0 - The talk code to begin the conversation at.
// Cell 1 - The number of the sfx to make
// Cell 2 - number of sfxes to make, defaults to 6
// Cell 3 - floater value
	// floater values:
	// 0 - stationary
	// 1 - floats slowly into air
	// 2 - starts high in air, drifts down
	// 3 - starts high in air, drifts down, drawn as addover
	
beginobjectscript; // talking object

variables;

short num_fx = 6;

body;

beginstate INIT_STATE;
	if (get_memory_cell(2) != 0)
		num_fx = get_memory_cell(2);
break;

beginstate DEAD_STATE;
	break;
	
beginstate START_STATE; 
	break;

beginstate RUN_ANIM_STATE;
	if (get_ran(1,0,100) < 16) 
		run_sparkles_on_object(ME,get_memory_cell(1),num_fx,get_memory_cell(3));
		
		
	break;
	
beginstate USE_STATE;
	if (get_memory_cell(0) == 0) {
		print_str_color("You can't do anything with this.",2);
		end();
		}

	begin_talk_mode(get_memory_cell(0));
break;
